#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
vector<int>ans;
const int N = 55, M = 5e5 + 10;
int a[N];
int f[M];
int n, x;
int main()
{
	cin >> n;
	int mi = 1e5;
	for (int i = 1; i <= n; i++) {
		cin >> a[i];
		mi = min(mi, a[i]);
	}
	cout << (mi ^ a[3]) + 2 << endl;
	return 0;
}